package com.hot.controller;

import com.hot.service.HotSercvice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Auther: wang.j.f
 * @Date: 2020/11/18 22:20
 * @Description:
 */
@RestController
@RequestMapping("/hot")
public class HotController {

    @Autowired
    private HotSercvice hotSercvice;

    @GetMapping("/getFromDb")
    public Map getFromDb(){
        Map result = new HashMap();
        result.put("result", hotSercvice.getFromMysql());
        return result;
    }

}
